<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="三包结算单" active="activeFlag[0]" ng-click="changeTab(0)">
            <div class="row wrapper-y-sm">
                <div class="operate-bar col-xs-8 font-0">
                    <button class="btn btn-operate m-r-sm" ng-click="addData()">新增</button>
                </div>
                <div class="search-bar wrapper-none col-xs-4">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="reset()" translate
                            translate-attr-title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" translate translate-attr-title="配置表格列"
                            ng-click="switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                        <!-- <div class="btn btn-default base-color" ng-if="!!btnPermission.handoverBillExport">
                            <div translate translate-attr-title="导出">
                                <i class="yb-icon ico-export-o"></i>
                            </div>
                            <ul class="more-tool">
                                <li yb-download download-url="exportParam.sectionUrl"
                                    download-param="exportParam.sectionParam" download-key="billIds">
                                    <i class="yb-icon ico-export-o"></i> <span translate>导出</span>
                                </li>
                                <li yb-download download-url="exportParam.allUrl" download-param="condition"
                                    download-duration="3" download-duration="3">
                                    <i class="yb-icon ico-export-o"></i> <span translate>导出全部</span>
                                </li>
                            </ul>
                        </div> -->
                    </div>
                    <button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearch')"
                        translate-attr-title="高级搜索" translate="高级搜索more"></button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" translate translate-attr-placeholder="结算单号"
                            ng-model="condition.settlementNo">
                        <span class="input-group-addon cursor-pointer" ng-click="search(1)" translate>搜索</span>
                    </div>
                </div>
            </div>
            <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)"
                reset-data="reset()">
                <div class="advance-search m-t-sm">

                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>结算单号</span>：</label>
                        <input ng-model="condition.settlementNo" class="form-control" name="settlementNo"
                            translate-attr-placeholder="结算单号"></input>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>代理商名称</span>：</label>
                        <input type="text" name="agentName" ng-model="condition.agentName" class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>结算单位</span>：</label>
                        <input type="text" name="settlementOrgName" ng-model="condition.settlementOrgName"
                            class="form-control">
                    </div>

                </div>
            </div>
            <div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tableConfig" col-fixed="true"
                has-check-col="true" set-tb-style="setFixedWidth()"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
                            <thead>
                                <tr>
                                    <!-- <th width="40" class="text-center border-l-none th-check">
                                        <div yb-check-box yb-checked="markInfo.allChecked" yb-click="selectForAll()">
                                        </div>
                                    </th> -->
                                    <th ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-click="toSort(tableConfig.tableCol, $index)"
                                        ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.fixedWidth"
                                            fixed-width="tbStyle.scrollLeft"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-click="toSort(tableConfig.tableCol, $index)"
                                        ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.scrollWidth">
                                        </div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="dataList.length > 0" ng-style="tbStyle.scrollLeftWidth">
                        <table class="table-fixed border-none">
                            <tbody>
                                <tr ng-repeat="item in dataList track by $index"
                                    ng-class="{'row-selected': $index === markInfo.cueRow}"
                                    ng-click="selectRow($index)">
                                    <!-- <td width="40" class="text-center border-l-none">
                                        <div yb-check-box yb-checked="item.isChecked" yb-click="selectSingle(item)">
                                        </div>
                                    </td> -->
                                    <td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-if="!!itemCol.isShow && !!itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">

                                        <div class="font-0" ng-if="itemCol.type === 'operate'">
                                            <button class="btn btn-operate m-r-xs" ng-click="editData(item)"
                                            ng-disabled="item.checkStatus == 1||item.auditStatus == 1"
                                                translate>编辑</button>
                                            <!-- <button class="btn btn-operate m-r-xs" ng-click="delApply(item)"
                                                ng-disabled="item.deliveryStatus >= 1 || !btnPermission.handoverBillRemove"
                                                translate    ng-disabled="item.checkStatus == 1||item.auditStatus == 1"
                                                translate-attr-title="{{!btnPermission.handoverBillRemove?'无权限执行此操作':''}}">删除</button> -->
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataList track by $index"
                                    ng-class="{'row-selected': $index === markInfo.cueRow}"
                                    ng-click="selectRow($index)">
                                    <td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <span ng-if="!itemCol.clickFn">{{item[itemCol.dataField]}}</span>
                                        <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)"
                                            ng-if="!!itemCol.clickFn">
                                            {{item[itemCol.dataField]}}
                                        </a>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0" translate>暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-check-box class="m-t-xs m-r-sm" yb-checked="markInfo.allChecked" yb-check-name="全选"
                    yb-click="selectAll()"></div>
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>
        <div tab heading="{{tabFlag.name}}" active="activeFlag[1]" ng-if="activeFlag[1]">
            <div class="clearfix" ng-show="stepList.curStep == 0">
                <div class="pos-a-full" style="right: 50%;top: 35px;">
                    <div class="row wrapper-y-sm">
                        <div class="search-bar wrapper-none col-xs-3">
                            <select class="form-control txt-search no-pic p-t-xs" ng-model="orderCondition.billType"
                                ng-options="item.code as item.name for item in billTypeList"></select>
                            </select>
                        </div>

                        <div class="search-bar wrapper-none col-xs-5 pull-right">
                            <div class="input-group pull-right clearfix">
                                <input type="text" class="form-control txt-search" translate
                                    translate-attr-placeholder="销售出库单号" ng-style="'200px'"
                                    ng-model="orderCondition.salesOutBillNo">
                                <span class="input-group-addon cursor-pointer" ng-click="searchBill(1)"
                                    translate>搜索</span>
                            </div>
                        </div>
                    </div>

                    <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right"
                        style="top:50px; bottom: 50px;">
                        <div class="th-fixed">
                            <table class="table-fixed border-none" width="{{addLeftTableConfig.fixedWidth}}">
                                <thead>
                                    <tr>
                                        <th width="40" class="text-center th-check border-l-none">
                                            <div yb-check-box yb-checked="orderMarkInfo.allChecked"
                                                yb-click="orderSelectAll()"></div>
                                        </th>
                                        <th ng-repeat="itemCol in addLeftTableConfig.tableCol track by $index"
                                            width="{{itemCol.width}}"
                                            ng-click="toSort(addLeftTableConfig.tableCol, $index)"
                                            ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                            <div yb-thead-operate ng-model="itemCol"
                                                target-width="addLeftTableConfig.fixedWidth"
                                                fixed-width="tbStyle.billFixedWidth"></div>
                                        </th>
                                    </tr>
                                </thead>
                            </table>
                        </div>
                        <div class="th-scroll-x" ng-style="tbStyle.billFixedWidth">
                            <table class="table-fixed border-none" width="{{addLeftTableConfig.scrollWidth}}">
                                <thead>
                                    <tr>
                                        <th ng-repeat="itemCol in addLeftTableConfig.tableCol track by $index"
                                            width="{{itemCol.width}}"
                                            ng-click="toSort(addLeftTableConfig.tableCol, $index)"
                                            ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                            <div yb-thead-operate ng-model="itemCol"
                                                target-width="addLeftTableConfig.scrollWidth"></div>
                                        </th>
                                    </tr>
                                </thead>
                            </table>
                        </div>
                        <div class="td-scroll-y" ng-show="orderDataList.length > 0">
                            <table class="table-fixed border-none" width="{{addLeftTableConfig.fixedWidth}}">
                                <tbody>
                                    <tr ng-repeat="item in orderDataList track by $index"
                                        ng-class="{'row-selected': $index === orderMarkInfo.cueRow}"
                                        ng-click="selectRow($index)">
                                        <td width="40" class="text-center border-l-none">
                                            <div yb-check-box yb-checked="item.isChecked"
                                                yb-click="orderSelectSingle(item)"></div>
                                        </td>
                                        <td class="spill-dots"
                                            ng-repeat="itemCol in addLeftTableConfig.tableCol track by $index"
                                            width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                            title="{{item[itemCol.dataField]}}">
                                            <span
                                                ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                            <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)"
                                                ng-if="!!itemCol.clickFn">
                                                {{item[itemCol.dataField]}}
                                            </a>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="td-scroll" ng-show="orderDataList.length > 0" ng-style="tbStyle.billFixedWidth">
                            <table class="table-fixed border-none" width="{{addLeftTableConfig.scrollWidth}}">
                                <tbody>
                                    <tr ng-repeat="item in orderDataList track by $index"
                                        ng-class="{'row-selected': $index === orderMarkInfo.cueRow}"
                                        ng-click="selectRow($index)">
                                        <td class="spill-dots"
                                            ng-repeat="itemCol in addLeftTableConfig.tableCol track by $index"
                                            width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                            title="{{item[itemCol.dataField]}}">
                                            <span
                                                ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                            <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)"
                                                ng-if="!!itemCol.clickFn">
                                                {{item[itemCol.dataField]}}
                                            </a>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="no-data w-full text-center p-t" ng-show="orderDataList.length === 0" translate>
                            暂时没有数据</div>
                    </div>
                    <div class="bottom-area page-bar wrapper-y-sm clearfix">
                        <div yb-check-box class="m-t-xs m-r-sm" yb-checked="orderMarkInfo.allChecked" yb-check-name="全选"
                            yb-click="orderSelectAll()"></div>
                        <div yb-page-info ng-model="orderPageInfo" yb-refresh="searchBill()"></div>
                    </div>
                </div>
                <div class="pos-a-full" style="left: 50%; padding-left: 10px;top: 35px;">
                    <div class="row wrapper-y-sm" translate>
                        <div class="p-t-form" translate>
                            已选单据
                        </div>
                    </div>
                    <div yb-table-fixed class="table-fixed-wrap" style="top:50px; bottom: 50px; left: 10px;">
                        <div class="th-scroll-x">
                            <table class="table-fixed border-none" width="800">
                                <thead>
                                    <tr>
                                        <th width="120" translate class="spill-dots">CRM单据号
                                        </th>
                                        <th width="120" translate class="spill-dots">销售出库单号
                                        </th>
                                        <th width="120" translate class="spill-dots">收货人
                                        </th>
                                        <th width="120" translate class="spill-dots">联系方式
                                        </th>
                                        <th width="120" translate class="spill-dots">收货地址
                                        </th>
                                        <th width="120" translate class="spill-dots">客户名称
                                        </th>
                                        <th width="120" class="spill-dots">创建日期</th>

                                        <th width="100" translate>操作</th>
                                    </tr>
                                </thead>
                            </table>
                        </div>
                        <div class="td-scroll" ng-show="selectedList.length > 0">
                            <table class="table-fixed border-none" width="800">
                                <tbody>
                                    <tr ng-repeat="item in selectedList track by $index">
                                        <td width="120" class="spill-dots" title="{{item.crmOrder}}">
                                            {{item.crmOrder}}</td>
                                        <td width="120" class="spill-dots" title="{{item.salesOutBillNo}}">
                                            {{item.salesOutBillNo}}</td>
                                        <td width="120" class="spill-dots" title="{{item.consignee}}">
                                            {{item.consignee}}</td>
                                        <td width="120" class="spill-dots" title="{{item.contactPhone}}">
                                            {{item.contactPhone}}
                                        </td>
                                        <td width="120" class="spill-dots" title="{{item.receiptAddress}}">
                                            {{item.receiptAddress}}</td>

                                        <td width="120" class="spill-dots" title="{{item.settlementOrgName}}">
                                            {{item.settlementOrgName}}</td>
                                        <td width="120" class="spill-dots"
                                            title="{{item.createDate|YbDate:'yyyy-MM-dd HH:mm:ss'}}">
                                            {{item.createDate|YbDate:'yyyy-MM-dd HH:mm:ss'}}</td>


                                        <td width="100"><button class="btn btn-operate" ng-click="delSelected($index)"
                                                translate>删除</button></td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="no-data w-full text-center p-t" ng-show="selectedList.length === 0" translate>暂时没有数据
                        </div>
                    </div>
                    <div class="bottom-area page-bar wrapper-y-sm text-right clearfix">
                        <button type="button" class="btn btn-primary" ng-disabled="selectedList.length==0"
                            ng-click="nextStep()" translate>下一步
                        </button>
                    </div>
                </div>
            </div>
            <div class="clearfix" ng-show="stepList.curStep == 1">
                <!-- <form name="orderForm" class="m-t-sm form-horizontal form-up-tb clearfix">
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-6 control-label max-w-200"><span translate>结算主机厂名称:</span>：</label>
                        <label class="col-xs-6 control-label p-l-n text-left spill-dots">
                            {{detailInfo.headInfo.settlementOrgName}}
                        </label>
                    </div>


                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100"><span translate>总金额</span>：</label>
                        <div class="col-xs-8 wrapper-none">
                            <input type="text" name="totalPrice" class="form-control"
                                ng-model="detailInfo.headInfo.totalPrice" yb-number-input disable-decimal="false"
                                decimal-places="2" max="99999999.99">
                        </div>
                    </div>

                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100"><span translate>备注</span>：</label>
                        <label class="col-xs-8 wrapper-none">
                            <input type="text" name="remark" class="form-control" ng-model="detailInfo.headInfo.remark">
                        </label>
                    </div>

                </form>
                -->

                <form name="orderForm" class="m-t-sm form-horizontal form-up-tb clearfix">
                    <div class="form-group col-xs-3 m-b-sm" ng-if="!!detailInfo.deliveryReceiptVO.billNo">
                        <label class="col-xs-4 control-label max-w-100"><span translate>经销商名称</span>：</label>
                        <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                            {{detailInfo.headInfo.agentOrgName}}
                        </label>
                    </div>

                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100"><span translate>结算主机厂名称</span>：</label>
                        <label class="col-xs-8 control-label p-l-n text-left">
                            {{detailInfo.headInfo.settlementOrgName}}
                        </label>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100"><span translate>合计金额</span>：</label>
                        <div class="col-xs-8 wrapper-none">
                            <input type="text" name="totalPrice" class="form-control" ng-disabled="tabFlag.type ==2"
                                ng-model="detailInfo.headInfo.totalPrice" yb-number-input disable-decimal="false"
                                decimal-places="2" max="99999999.99">
                        </div>
                    </div>

                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100"><span translate>备注</span>：</label>
                        <div class="col-xs-8 wrapper-none">
                            <input type="text" name="remark" class="form-control" ng-model="detailInfo.headInfo.remark"
                                ng-disabled="tabFlag.type ==2">
                        </div>
                    </div>

                </form>
                <div class="pos-a-full" style="right: 50%;padding-left: 10px;" ng-style="{'top':'120px' }">
                    <div class="row wrapper-y-sm">
                        <button class="btn btn-operate m-r-sm" ng-click="selectBill()" translate
                            ng-show="tabFlag.type !=2">选择业务单据</button>
                    </div>
                    <div yb-table-fixed class="table-fixed-wrap" style="top:35px; bottom: 60px; left: 10px;">
                        <div class="th-scroll-x">
                            <table class="table-fixed border-none" width="800">
                                <thead>
                                    <tr>
                                        <th translate width="100">CRM单据号</th>
                                        <th translate width="100">销售出库单号</th>
                                        <th translate width="100">收货人</th>
                                        <th translate width="100">联系方式</th>
                                        <th translate width="100">收货地址</th>
                                        <th translate width="100">客户名称</th>
                                        <th translate width="100" >操作</th>
                                    </tr>
                                </thead>
                            </table>
                        </div>
                        <div class="td-scroll">
                            <table class="table-fixed border-none" width="800">
                                <tbody>
                                    <tr ng-repeat="item in selectedList track by $index">
                                        <td class="spill-dots" title="{{item.crmOrder}}" width="100">
                                            {{item.crmOrder}}</td>
                                        <td class="spill-dots" title="{{item.salesOutBillNo}}" width="100">
                                            {{item.salesOutBillNo}}</td>
                                        <td class="spill-dots" title="{{item.consignee}}" width="100">
                                            {{item.consignee}}</td>
                                        <td class="spill-dots" title="{{item.contactPhone}}" width="100">
                                            {{item.contactPhone}}</td>
                                        <td class="spill-dots" title="{{item.receiptAddress}}" width="100">
                                            {{item.receiptAddress}}</td>
                                        <td class="spill-dots" title="{{item.settlementOrgName}}" width="100">
                                            {{item.settlementOrgName}}</td>
                                        <td class="spill-dots" title="{{item.settlementOrgName}}" width="100"
                                           >
                                            <button class="btn btn-operate m-r-xs"  ng-disabled="tabFlag.type ==2"
                                                ng-click="delBillOut(item, $index, $event)" translate>删除</button>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="pos-a-full" style="left: 50%;padding-left: 10px;" ng-style="{'top':  '120px'}">
                    <div class="row wrapper-y-sm" translate>
                        <div class="p-t-form" translate>
                            零件信息
                        </div>
                    </div>

                    <div yb-table-fixed class="table-fixed-wrap" style="top:35px; bottom: 60px; left: 10px;">
                        <div class="th-scroll-x">
                            <table class="table-fixed border-none" width="900">
                                <thead>
                                    <tr>
                                        <th width="100" translate>crm订单号</th>
                                        <th width="100" translate>销售单号</th>
                                        <th width="160" translate>销售出库单号</th>
                                        <th width="100" translate>零件号</th>
                                        <th width="140" translate>零件中文名</th>
                                        <th width="100" translate>收货人</th>
                                        <th width="100" translate>联系方式</th>
                                        <th width="100" translate>收货地址</th>
                                        <th width="100" translate>数量</th>
                                        <th width="100" translate>出库数量</th>
                                        <th width="100" translate>单价</th>
                                        <th width="100" translate>合计金额</th>
                                    </tr>
                                </thead>
                            </table>
                        </div>
                        <div class="td-scroll">
                            <table class="table-fixed border-none" width="500">
                                <tbody>
                                    <tr ng-repeat="item in detailInfo.details track by $index">

                                        <td width="100" class="spill-dots" title="{{ item.crmOrder }}">{{ item.crmOrder
                                            }}</td>
                                        <td width="100" class="spill-dots" title="{{ item.saleBillNo }}">{{
                                            item.saleBillNo }}</td>
                                        <td width="160" class="spill-dots" title="{{ item.salesOutBillNo }}">{{
                                            item.salesOutBillNo }}</td>
                                        <td width="100" class="spill-dots" title="{{ item.materialsNo }}">{{
                                            item.materialsNo }}</td>
                                        <td width="140" class="spill-dots" title="{{ item.materialsDesc }}">{{
                                            item.materialsDesc }}</td>
                                        <td width="100" class="spill-dots" title="{{ item.consignee }}">{{
                                            item.consignee }}</td>
                                        <td width="100" class="spill-dots" title="{{ item.contactPhone }}">{{
                                            item.contactPhone }}</td>
                                        <td width="100" class="spill-dots" title="{{ item.receiptAddress }}">{{
                                            item.receiptAddress }}</td>
                                        <td width="100" class="spill-dots" title="{{ item.amount }}">{{ item.amount }}
                                        </td>
                                        <td width="100" class="spill-dots" title="{{ item.outAmount }}">{{
                                            item.outAmount }}</td>
                                        <td width="100" class="spill-dots" title="{{ item.unitPrice }}">{{
                                            item.unitPrice }}</td>
                                        <td width="100" class="spill-dots" title="{{ item.totalPrice }}">{{
                                            item.totalPrice }}</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="no-data w-full text-center p-t"
                            ng-show=" detailInfo.details==null||detailInfo.details.length === 0" translate>
                            暂时没有数据</div>
                    </div>
                </div>
                <div class="bottom-area btn-bar text-center border-t clearfix">
                    <button type="button" class="btn btn-default m-r-sm" ng-click="goBack()" ng-if="tabFlag.type==0"
                        translate>上一步
                    </button>
                    <button type="button" class="btn btn-primary m-r-sm" ng-disabled="clickValue"
                        ng-show="tabFlag.type !=2" ng-click="saveData(orderForm.$valid)" translate>保存</button>
                    <button type="button" class="btn btn-default" ng-click="changeTab(0)" translate>取消</button>
                </div>
            </div>
        </div>
        <div tab heading="详情" active="activeFlag[2]" ng-if="headFlagTwo == 'detail'" ng-click="changeTab(2)">
            <div class="m-t-sm form-up-tb clearfix">
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>发运交接单号</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.billNo || '-'}}">
                        {{detailInfo.deliveryReceiptVO.billNo || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>采购合同号</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.purchaseContractNo || '-'}}">
                        {{detailInfo.deliveryReceiptVO.purchaseContractNo || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>客户名称</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.dealerOrgName || '-'}}">
                        {{detailInfo.deliveryReceiptVO.dealerOrgName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>制单人</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.createName || '-'}}">
                        {{detailInfo.deliveryReceiptVO.createName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>制单时间</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{(detailInfo.deliveryReceiptVO.createDate|YbDate:'yyyy-MM-dd HH:mm:ss') || '-'}}">
                        {{(detailInfo.deliveryReceiptVO.createDate|YbDate:'yyyy-MM-dd HH:mm:ss') || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>交货日期</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{(detailInfo.deliveryReceiptVO.deliveryTime|YbDate:'yyyy-MM-dd') || '-'}}">
                        {{(detailInfo.deliveryReceiptVO.deliveryTime|YbDate:'yyyy-MM-dd') || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>国家和地区</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.country || '-'}}">
                        {{detailInfo.deliveryReceiptVO.country || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>单据类型</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.billType|orderType}}">
                        {{detailInfo.deliveryReceiptVO.billType|orderType}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>工厂名称</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.orgName || '-'}}">
                        {{detailInfo.deliveryReceiptVO.orgName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>运输方式</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.shippingMethod || '-'}}">
                        {{detailInfo.deliveryReceiptVO.shippingMethod || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>结算方式</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.settlementDesc || '-'}}">
                        {{detailInfo.deliveryReceiptVO.settlementDesc || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>收货人</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.receiverName || '-'}}">
                        {{detailInfo.deliveryReceiptVO.receiverName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>联系方式</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.receiverTel || '-'}}">
                        {{detailInfo.deliveryReceiptVO.receiverTel || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>传真</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.receiverFax || '-'}}">
                        {{detailInfo.deliveryReceiptVO.receiverFax || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>收货地址</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.receiverAddress || '-'}}">
                        {{detailInfo.deliveryReceiptVO.receiverAddress || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>地址编码</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.addressCode || '-'}}">
                        {{detailInfo.deliveryReceiptVO.addressCode || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <lable class="col-xs-4 m-b-n text-right max-w-100"><span translate>收货站点</span>：</lable>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.receiverSite || '-'}}">
                        {{detailInfo.deliveryReceiptVO.receiverSite || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>发货日期</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{(detailInfo.deliveryReceiptVO.deliveryDate|YbDate:'yyyy-MM-dd HH:mm:ss') || '-'}}">
                        {{(detailInfo.deliveryReceiptVO.deliveryDate|YbDate:'yyyy-MM-dd HH:mm:ss') || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>费用</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.carrierAmount || '-'}}">
                        {{detailInfo.deliveryReceiptVO.carrierAmount || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>承运商</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.carrierOrgName || '-'}}">
                        {{detailInfo.deliveryReceiptVO.carrierOrgName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>承运人</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.carrierUserName || '-'}}">
                        {{detailInfo.deliveryReceiptVO.carrierUserName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>重量</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.totalWeight || '-'}}">
                        {{detailInfo.deliveryReceiptVO.totalWeight || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>参考运费</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.freight || '-'}}">
                        {{detailInfo.deliveryReceiptVO.freight || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>运输车辆</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.carrierCar || '-'}}">
                        {{detailInfo.deliveryReceiptVO.carrierCar || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>物流单号</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.freightNo || '-'}}">
                        {{detailInfo.deliveryReceiptVO.freightNo || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>备注</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.remark || '-'}}">
                        {{detailInfo.deliveryReceiptVO.remark || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm" ng-if="isJCHK">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>验箱人</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.checkerName || '-'}}">
                        {{detailInfo.deliveryReceiptVO.checkerName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>总重量（kg）</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.grossWeight || '-'}}">
                        {{detailInfo.deliveryReceiptVO.grossWeight || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>总体积（m³）</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.grossVolume || '-'}}">
                        {{detailInfo.deliveryReceiptVO.grossVolume || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100"><span translate>总包裹数</span>：</label>
                    <div class="col-xs-8 wrapper-none spill-dots"
                        title="{{detailInfo.deliveryReceiptVO.expressItemQty || '-'}}">
                        {{detailInfo.deliveryReceiptVO.expressItemQty || "-"}}
                    </div>
                </div>
            </div>
            <div tabset type="sub-tab">
                <div tab heading="关联单据" active="subTabFlag[0]">
                    <div class="main-area d-b-60" ng-style="{top:isEN?'340px':'310px'}">
                        <div yb-table-fixed class="table-fixed-wrap">
                            <div class="th-scroll-x">
                                <table class="table-fixed border-none" width="100%">
                                    <thead>
                                        <tr>
                                            <th translate>业务单号</th>
                                            <th translate>销售单号</th>
                                            <th translate>采购单号</th>
                                            <th ng-if="curOrg.companyType =='2'" translate>源运单号</th>
                                            <th translate>备注</th>
                                            <th ng-if="detailInfo.deliveryReceiptVO.billType=='XGSC'" translate>车型</th>
                                            <th ng-if="detailInfo.deliveryReceiptVO.billType=='XGSC'" translate>车号</th>
                                            <th ng-if="detailInfo.deliveryReceiptVO.billType=='XGSC'" translate>CRM单据号
                                            </th>
                                            <th ng-if="detailInfo.deliveryReceiptVO.billType=='XGSC'" translate>服务人员
                                            </th>
                                            <th ng-if="detailInfo.deliveryReceiptVO.billType=='XGSC'" translate>服务网点
                                            </th>
                                        </tr>
                                    </thead>
                                </table>
                            </div>
                            <div class="td-scroll">
                                <table class="table-fixed border-none" width="100%">
                                    <tbody>
                                        <tr ng-repeat="item in detailInfo.billList track by $index">
                                            <td class="spill-dots" title="{{item.deliveryNoteNo}}">
                                                {{item.deliveryNoteNo}}</td>
                                            <td class="spill-dots" title="{{item.saleBillNo}}">{{item.saleBillNo}}</td>
                                            <td class="spill-dots" title="{{item.purchaseBillNo}}">
                                                {{item.purchaseBillNo}}</td>
                                            <td class="spill-dots" title="{{item.sourceDeliveryNo}}"
                                                ng-if="curOrg.companyType =='2'">{{item.sourceDeliveryNo}}</td>
                                            <td class="spill-dots" title="{{item.remark}}">{{item.remark}}</td>
                                            <td class="spill-dots" title="{{item.threeGuaServiceVO.prodType}}"
                                                ng-if="detailInfo.deliveryReceiptVO.billType=='XGSC'">
                                                {{item.threeGuaServiceVO.prodType}}</td>
                                            <td class="spill-dots" title="{{item.threeGuaServiceVO.machineNumber}}"
                                                ng-if="detailInfo.deliveryReceiptVO.billType=='XGSC'">
                                                {{item.threeGuaServiceVO.machineNumber}}</td>
                                            <td class="spill-dots" title="{{item.threeGuaServiceVO.crmOrder}}"
                                                ng-if="detailInfo.deliveryReceiptVO.billType=='XGSC'">
                                                {{item.threeGuaServiceVO.crmOrder}}</td>
                                            <td class="spill-dots" title="{{item.threeGuaServiceVO.serviceName}}"
                                                ng-if="detailInfo.deliveryReceiptVO.billType=='XGSC'">
                                                {{item.threeGuaServiceVO.serviceName}}</td>
                                            <td class="spill-dots" title="{{item.threeGuaServiceVO.serviceSite}}"
                                                ng-if="detailInfo.deliveryReceiptVO.billType=='XGSC'">
                                                {{item.threeGuaServiceVO.serviceSite}}</td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
                <div tab heading="零件信息" active="subTabFlag[1]">
                    <div class="main-area d-b-60" ng-style="{top:isEN?'340px':'310px'}">
                        <div yb-table-fixed class="table-fixed-wrap">
                            <div class="th-scroll-x">
                                <table class="table-fixed border-none" width="100%">
                                    <thead>
                                        <tr>
                                            <th translate>装箱清单号</th>
                                            <th translate>业务单号</th>
                                            <th translate>条码</th>
                                            <th translate>零件编号</th>
                                            <th translate>零件中文名</th>
                                            <th translate>数量</th>
                                            <th translate>单价</th>
                                            <th translate>小计</th>
                                        </tr>
                                    </thead>
                                </table>
                            </div>
                            <div class="td-scroll">
                                <table class="table-fixed border-none" width="100%">
                                    <tbody>
                                        <tr ng-repeat="item in detailInfo.materialsList track by $index">
                                            <td class="spill-dots" title="{{item.boxupNo}}">{{item.boxupNo}}</td>
                                            <td class="spill-dots" title="{{item.deliveryNoteNo}}">
                                                {{item.deliveryNoteNo}}</td>
                                            <td class="spill-dots" title="{{item.barcode}}">{{item.barcode}}</td>
                                            <td class="spill-dots" title="{{item.materialsNo}}">{{item.materialsNo}}
                                            </td>
                                            <td class="spill-dots" title="{{item.materialsDes}}">{{item.materialsDes}}
                                            </td>
                                            <td class="spill-dots" title="{{item.qty}}">{{item.qty}}</td>
                                            <td class="spill-dots" title="{{item.unitPriceAfterAdjust}}">
                                                {{item.unitPriceAfterAdjust}}</td>
                                            <td class="spill-dots" title="{{item.totalPriceAfterAdjust}}">
                                                {{item.totalPriceAfterAdjust}}</td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>



            </div>
            <div class="bottom-area btn-bar text-center border-t clearfix">
                <button ng-if="!!btnPermission.handoverBillAddPackage" type="button" class="btn btn-default"
                    ng-click="changeTab(5)" translate>新增装箱</button>
                <button type="button" class="btn btn-default" ng-click="changeTab(0)" translate>取消</button>
            </div>
        </div>

    </div>
</div>
